import requests

class RequestClient:

    def __init__(self,base_url):
        self.base_url=base_url
        self.session=requests.session()

    def send_requests(self,method,path,**kwargs):
        full_url=f'{self.base_url}{path}'
        try:
            req=requests.request(method=method,url=full_url,**kwargs)
            return req

        except Exception as e:
            print(f'请求失败{e}')

    def post(self,url,**kwargs):
        return self.send_requests("POST",path=url,**kwargs)